package de.jmda.core.util;

import java.util.HashSet;
import java.util.Set;

public abstract class CollectionsUtil
{
  @SafeVarargs
  public static <T> Set<T> asSet(T... elems)
  {
  	Set<T> result = new HashSet<>();
  	
  	if (elems == null)
  	{
  		return result;
  	}
  	
  	for (T elem : elems)
  	{
  		result.add(elem);
  	}
  	
  	return result;
  }
}
